<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.outbuffer</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.outbuffer";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.outbuffer.html" class="symbol">std.outbuffer</a></h1>
  
<p class="sec_header">Boilerplate:</p><!-- undefined macro in std/outbuffer.d -->
<dl>
<dt class="decl">class <a class="symbol _class" name="OutBuffer" href="./htmlsrc/std.outbuffer.html#L37" kind="class" beg="37" end="326">OutBuffer</a>; <a title="Permalink to this symbol" href="#OutBuffer" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L37">#</a></dt>
<dd class="ddef">
<div class="summary">OutBuffer provides a way to build up an array of bytes out
 of raw data. It is useful for things like preparing an
 array of bytes to write out to a file.
 OutBuffer's byte order is the format native to the computer.
 To control the byte order (endianness), use a class derived
 from OutBuffer.</div>
<dl>
<dt class="decl">ubyte data[] <a class="symbol _variable" name="OutBuffer.data" href="./htmlsrc/std.outbuffer.html#L39" kind="variable" beg="39" end="39">data</a>; <a title="Permalink to this symbol" href="#OutBuffer.data" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L39">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="OutBuffer.offset" href="./htmlsrc/std.outbuffer.html#L40" kind="variable" beg="40" end="40">offset</a>; <a title="Permalink to this symbol" href="#OutBuffer.offset" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L40">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _invariant" name="OutBuffer.invariant" href="./htmlsrc/std.outbuffer.html#L42" kind="invariant" beg="42" end="47">invariant</a>; <a title="Permalink to this symbol" href="#OutBuffer.invariant" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L42">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="OutBuffer.this" href="./htmlsrc/std.outbuffer.html#L49" kind="ctor" beg="49" end="52">this</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L49">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ubyte[] <a class="symbol _function" name="OutBuffer.toBytes" href="./htmlsrc/std.outbuffer.html#L58" kind="function" beg="58" end="58">toBytes</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.toBytes" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L58">#</a></dt>
<dd class="ddef">
<div class="summary">Convert to array of bytes.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.reserve" href="./htmlsrc/std.outbuffer.html#L69" kind="function" beg="69" end="88">reserve</a><span class="params">(uint <em>nbytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.reserve" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L69">#</a></dt>
<dd class="ddef">
<div class="summary">Preallocate nbytes more to the size of the internal buffer.</div>
This is a
 speed optimization, a good guess at the maximum size of the resulting
 buffer will improve performance by eliminating reallocations and copying.</dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write" href="./htmlsrc/std.outbuffer.html#L94" kind="function" beg="94" end="99">write</a><span class="params">(ubyte[] <em>bytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L94">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:3" href="./htmlsrc/std.outbuffer.html#L108" kind="function" beg="108" end="108">write</a><span class="params">(byte <em>b</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L108">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:4" href="./htmlsrc/std.outbuffer.html#L109" kind="function" beg="109" end="109">write</a><span class="params">(char <em>c</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L109">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:6" href="./htmlsrc/std.outbuffer.html#L118" kind="function" beg="118" end="118">write</a><span class="params">(short <em>s</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L118">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:9" href="./htmlsrc/std.outbuffer.html#L134" kind="function" beg="134" end="134">write</a><span class="params">(int <em>i</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L134">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:11" href="./htmlsrc/std.outbuffer.html#L143" kind="function" beg="143" end="143">write</a><span class="params">(long <em>l</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L143">#</a></dt>
<dd class="ddef">
<div class="summary">Append data to the internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:2" href="./htmlsrc/std.outbuffer.html#L101" kind="function" beg="101" end="106">write</a><span class="params">(ubyte <em>b</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L101">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:5" href="./htmlsrc/std.outbuffer.html#L111" kind="function" beg="111" end="116">write</a><span class="params">(ushort <em>w</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L111">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:7" href="./htmlsrc/std.outbuffer.html#L120" kind="function" beg="120" end="125">write</a><span class="params">(wchar <em>c</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L120">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:8" href="./htmlsrc/std.outbuffer.html#L127" kind="function" beg="127" end="132">write</a><span class="params">(uint <em>w</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L127">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:10" href="./htmlsrc/std.outbuffer.html#L136" kind="function" beg="136" end="141">write</a><span class="params">(ulong <em>l</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L136">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:12" href="./htmlsrc/std.outbuffer.html#L145" kind="function" beg="145" end="150">write</a><span class="params">(float <em>f</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:12" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L145">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:13" href="./htmlsrc/std.outbuffer.html#L152" kind="function" beg="152" end="157">write</a><span class="params">(double <em>f</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:13" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L152">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:14" href="./htmlsrc/std.outbuffer.html#L159" kind="function" beg="159" end="164">write</a><span class="params">(real <em>f</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:14" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L159">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:15" href="./htmlsrc/std.outbuffer.html#L166" kind="function" beg="166" end="169">write</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:15" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L166">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:16" href="./htmlsrc/std.outbuffer.html#L171" kind="function" beg="171" end="174">write</a><span class="params">(OutBuffer <em>buf</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:16" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L171">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.fill0" href="./htmlsrc/std.outbuffer.html#L180" kind="function" beg="180" end="185">fill0</a><span class="params">(uint <em>nbytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.fill0" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L180">#</a></dt>
<dd class="ddef">
<div class="summary">Append nbytes of 0 to the internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.alignSize" href="./htmlsrc/std.outbuffer.html#L191" kind="function" beg="191" end="206">alignSize</a><span class="params">(uint <em>alignsize</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.alignSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L191">#</a></dt>
<dd class="ddef">
<div class="summary">0-fill to align on power of 2 boundary.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.align2" href="./htmlsrc/std.outbuffer.html#L212" kind="function" beg="212" end="216">align2</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.align2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L212">#</a></dt>
<dd class="ddef">
<div class="summary">Optimize common special case alignSize(2)</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.align4" href="./htmlsrc/std.outbuffer.html#L222" kind="function" beg="222" end="228">align4</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.align4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L222">#</a></dt>
<dd class="ddef">
<div class="summary">Optimize common special case alignSize(4)</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="OutBuffer.toString" href="./htmlsrc/std.outbuffer.html#L234" kind="function" beg="234" end="238">toString</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.toString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L234">#</a></dt>
<dd class="ddef">
<div class="summary">Convert internal buffer to array of chars.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.vprintf" href="./htmlsrc/std.outbuffer.html#L244" kind="function" beg="244" end="290">vprintf</a><span class="params">(char[] <em>format</em>, va_list <em>args</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.vprintf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L244">#</a></dt>
<dd class="ddef">
<div class="summary">Append output of C's vprintf() to internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.printf" href="./htmlsrc/std.outbuffer.html#L296" kind="function" beg="296" end="302">printf</a><span class="params">(char[] <em>format</em>, ...)</span>; <a title="Permalink to this symbol" href="#OutBuffer.printf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L296">#</a></dt>
<dd class="ddef">
<div class="summary">Append output of C's printf() to internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.spread" href="./htmlsrc/std.outbuffer.html#L309" kind="function" beg="309" end="325">spread</a><span class="params">(uint <em>index</em>, uint <em>nbytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.spread" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L309">#</a></dt>
<dd class="ddef">
<div class="summary">At offset index into buffer, create nbytes of space by shifting upwards
 all data past index.</div></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.outbuffer.html#L328" kind="unittest" beg="328" end="343">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L328">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2001-2005 by Digital Mars
	All Rights Reserved
	www.digitalmars.com</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 03:40:08 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>